import request from '@/utils/request'

// 后台头部公共的路径
// const api_name = '/syt/hosp/hospitalSet'

export default {

  // 查询医院管理列表的方法
  getPageList(current, limit, searchObj) {
    return request({
      // /syt/hosp/hospitalSet/findPage/${current}/${limit}
      url: `/syt/hosp/hospitalSet/findPage/${current}/${limit}/`,
      method: 'post',
      data: searchObj // 以 json 的形式传入的接口中
    })
  },

  //删除医院设置
  deleteHospSet(id) {
    return request({
      url: `/syt/hosp/hospitalSet/${id}/`,
      method: 'delete'
    })
  },

  // 批量删除
  removeRowsdelect(idList) {
    return request({
      url: `/syt/hosp/hospitalSet/batchRemove/`,
      method: 'delete',
      data: idList
    })
  },

  //锁定和取消锁定
  lockHospSet(id, status) {
    return request({
      url: `/syt/hosp/hospitalSet/lockHospitalSet/${id}/${status}/`,
      method: 'put'
    })
  },
  //添加医院设置
  saveHospSet(hospitalSet) {
    return request({
      url: `/syt/hosp/hospitalSet/saveHospital`,
      method: 'post',
      data: hospitalSet
    })
  },

  //院设置id查询
  getHospSet(id) {
    return request({
      url: `/syt/hosp/hospitalSet/getHospSet/${id}`,
      method: 'get'
    })
  },
  //修改医院设置
  updateHospSet(hospitalSet) {
    return request({
      url: `/syt/hosp/hospitalSet/updateHosp`,
      method: 'post',
      data: hospitalSet
    })
  }



}
